#!/bin/bash
#
read -p "磁盘名称:" disk_name
df -hT | grep "$disk_name" &> /dev/null
if [ $? -ne 0 ];then
    echo "磁盘不存在"
    exit 67
else
usage=$(df -hT | grep "/dev/shm" | awk '{print $6}' | awk -F% '{print $1}' )
if [ "$usage" -gt 30 ]; then
  echo "警告"
else
  echo "正常"
fi
fi
